In the present day sensors that are used to capture digital images typically contain an array of pixels that each records light intensity or luminance. Such sensors may employ charge coupled devices (CCD) or other semiconductor devices as the detector part of a sensor element or cell. In order to record color images in a digital format a twodimensional color filter is typically applied to filter light before the light impinges on sensor pixels. The color filter includes an array of sub-filters that are each designed to transmit light of only a given wavelength (range) to a given cell or sub-pixel. As an example, in some filters, the array of sub-filters may be composed of red, green, and blue sub-filters. Thus, any given detector of the sensor covered by such a filter may receive red, green, or blue light, rendering each detector of the sensor as a respective red, green, or blue sub-pixel. Each sub-pixel thereby records photons of the respective red, green or blue light wavelength range and transforms the photons into a charge that is proportional to the amount of light.
In some cameras cyan, magenta, and yellow (CMY) sub-filters are used rather than red, green, blue (RGB) filters because the former transmit more light. Other filters may employ four different color sub-filters. Regardless of the color filter scheme, a common factor in all color filter array sensors or cameras is that each cell in the camera sensor captures light of one color and converts the received light into a gray level intensity or grayscale value for that color.
Typically, the captured gray-levels are transformed to a new set of gray levels that can be presented either on a screen or via some media format. This process is commonly known as a camera image/signal processing (ISP). The image usually is initially captured as a one-channel image such that the desired color of a three-channel image is subsampled (mosaicked) along the imaging sensor matrix upon capture.
In order to output a full-color image for a mosaicked image, an interpolation process called demosaicking is employed. However, before demosaicking, a “white balancing” process is commonly performed to the captured image. White balancing refers to a procedure that adjusts intensity values for different color channels in white (gray) regions of an image such that the adjusted values for different colors, such as red, green and blue, are as identical to one another other as possible. Thus if a gray patch is captured with uniform lighting, all of the sub-pixels or cells (whether red, green, or blue) should report nearly the same intensity level. In general, known methods that correct white-imbalance involve the computation of global (full image) gains for the red, the green and the blue cells. Provided that the pedestal (black level) has been removed from the image, these gains, if chosen properly, may correct the white-imbalance in the image.
However, image processing based upon the commonly employed approaches used in the present day equally treat all the pixels of the recorded image, even though in typical images many or most the pixels may not represent gray regions. Accordingly, white balancing based upon known procedures may be inaccurate.
Accordingly, there may be a need for improved techniques and apparatus to solve these and other problems.